function [] = displayRemainingTime(iter, NumIters, freqDisplay)
	if mod(iter, freqDisplay) == 0
		elapsed = toc;
		remaining = elapsed/(iter) * (NumIters-iter);
		mytext = sprintf('Iteration %d out of %d - elapsed = %.2f, remaining = %.2f', iter, NumIters, elapsed, remaining);
		disp(mytext);
	end
end